#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
const int N = 11;
int n;
int f[1 << N];
void dfs(int left, int right)
{
    if (left > right)
    {
        return;
    }
    int sum = f[right] - f[left - 1];
    char ret;
    if (sum == 0)
    {
        ret = 'B';
    }
    else if (sum == right - left + 1)
    {
        ret = 'I';
    }
    else
    {
        ret = 'F';
    }
    if (left == right)
    {
        cout << ret;
        return;
    }
    int mid = (right + left) / 2;
    dfs(left, mid);
    dfs(mid + 1, right);
    cout << ret;
}
int main()
{
    cin >> n;
    n = (1 << n);
    for (int i = 1; i <= n; i++)
    {
        char x;
        cin >> x;
        int t = 0;
        if (x == '1')
        {
            t = 1;
        }
        f[i] = f[i - 1] + t;
    }
    dfs(1, n);
    return 0;
}